﻿using BCCommon;
using System.ComponentModel.DataAnnotations;

namespace BCDto.Website.User
{
    /// <summary>
    /// 用户密码重置
    /// </summary>
    public class UserPutResetPasswordDto
    {
        /// <summary>
        /// 手机号
        /// </summary>	
        [Display(Name = "手机号")]
        [Required(ErrorMessage = "{0} 不能为空。")]
        [StringLength(11, MinimumLength = 11, ErrorMessage = "{0} 长度为 {1} 个数字")]
        [RegularExpression(RegexPatterns.PHONE, ErrorMessage = "{0} 格式不正确")]
        public string Phone { get; set; }

        /// <summary>
        /// 密码
        /// </summary>	
        [Display(Name = "密码")]
        [Required(ErrorMessage = "{0} 不能为空。")]
        [StringLength(16, ErrorMessage = "{0} 长度为 {2} 到 {1} 个字符", MinimumLength = 8)]
        [RegularExpression(RegexPatterns.PASSWORD, ErrorMessage = "{0} 需包含字母和数字")]
        public string Password { get; set; }

        /// <summary>
        /// 验证码。
        /// </summary>
        [Display(Name = "验证码")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [StringLength(6, ErrorMessage = "{0} 长度为 {1} 个数字", MinimumLength = 6)]
        [RegularExpression(RegexPatterns.SIX_PASS_CODE, ErrorMessage = "{0} 长度为 6 个数字")]
        public string PassCode { get; set; }
    }
}
